// 数据状态的管理(记录/取值/修改/删除)
export default {
    namespaced: true,
    // 存数据
    state: {
      goodsid: '',
      goodsname: '',
      goodscover: '',
    },
    getters: {
  
    },
    // 修改数据
    mutations: {
      setgoodsname(state, value) {
        state.goodsname = value;
      },
      setgoodsid(state, value) {
        state.goodsid = value;
      },
      setgoodscover(state, value) {
        state.goodscover = value;
      },
  
    },
    // 提交修改数据的方法(异步)
    actions: {
      setgoodsidAsync(content,value){
        content.commit('setgoodsid',value)
      },
      setgoodsnameAsync(content,value){
        content.commit('setgoodsname',value)
      },
      setgoodscoverAsync(content,value){
        content.commit('setgoodscover',value)
      }
    },
    modules: {
    }
  }
  